package com.juns.server.service;

import com.juns.server.baen.User;
import com.juns.server.dto.RspResult;
import com.juns.server.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wjunjie
 * @version 1.0
 * @E-mail wang_junjie007@163.com
 * @company ZZYD
 * @createTime 2018/8/2 10:25
 * @类注释:
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public RspResult<User> findAll() {
        RspResult<User> dto=new RspResult<>();
        List<User> dser = userMapper.findAll();
        dto.setCode(1);
        dto.setMsg("success");
        dto.setBody(dser);
        return dto;
    }
}
